package com.fudan.adse.service;

import com.fudan.adse.domain.dto.NewTopUpDTO;
import com.fudan.adse.domain.po.TopUpOrder;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * 充值服务
 * @author Jerry Zhang
 * create: 2022-11-23 22:59
 */
public interface TopUpService {
    /**
     * 获取某人的充值订单
     *
     * @param username
     * @param status
     * @return
     */
    List<TopUpOrder> getOrdersByConditions(String username, String status);

    /**
     * 充值
     * @param newTopUp
     * @return
     */
    TopUpOrder topUp(NewTopUpDTO newTopUp);

    /**
     * 更新支付状态
     * @param uuid
     * @param status
     */
    @Transactional
    void updateOrder(String uuid, String status);
}
